Optimal. Leaf size=82 \[ \frac{\tanh ^{-1}(\sin (c+d x))}{a^4 d}-\frac{2 i \sec (c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{2 i \sec ^3(c+d x)}{3 a d (a+i a \tan (c+d x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0866693, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3500, 3770} \[ \frac{\tanh ^{-1}(\sin (c+d x))}{a^4 d}-\frac{2 i \sec (c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{2 i \sec ^3(c+d x)}{3 a d (a+i a \tan (c+d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3500
Rule 3770
Rubi steps
\begin{align*} \int \frac{\sec ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac{2 i \sec ^3(c+d x)}{3 a d (a+i a \tan (c+d x))^3}-\frac{\int \frac{\sec ^3(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{a^2}\\ &=\frac{2 i \sec ^3(c+d x)}{3 a d (a+i a \tan (c+d x))^3}-\frac{2 i \sec (c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{\int \sec (c+d x) \, dx}{a^4}\\ &=\frac{\tanh ^{-1}(\sin (c+d x))}{a^4 d}+\frac{2 i \sec ^3(c+d x)}{3 a d (a+i a \tan (c+d x))^3}-\frac{2 i \sec (c+d x)}{d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end{align*}
Mathematica [B] time = 0.241428, size = 247, normalized size = 3.01 \[ \frac{\sec ^4(c+d x) (\cos (d x)+i \sin (d x))^4 \left (-6 i \sin (3 c) \sin (d x)+2 i \sin (c) \sin (3 d x)-2 \sin (c) \cos (3 d x)+6 \sin (3 c) \cos (d x)+\cos (3 c) (-6 \sin (d x)-6 i \cos (d x))+2 \cos (c) (\sin (3 d x)+i \cos (3 d x))-3 \cos (4 c) \log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )-3 i \sin (4 c) \log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )+3 \cos (4 c) \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )+3 i \sin (4 c) \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )\right )}{3 a^4 d (\tan (c+d x)-i)^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.09, size = 86, normalized size = 1.1 \begin{align*}{\frac{1}{{a}^{4}d}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) }+{\frac{8\,i}{{a}^{4}d} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -i \right ) ^{-2}}-{\frac{16}{3\,{a}^{4}d} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -i \right ) ^{-3}}-{\frac{1}{{a}^{4}d}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.51308, size = 190, normalized size = 2.32 \begin{align*} \frac{-6 i \, \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) - 6 i \, \arctan \left (\cos \left (d x + c\right ), -\sin \left (d x + c\right ) + 1\right ) + 4 i \, \cos \left (3 \, d x + 3 \, c\right ) - 12 i \, \cos \left (d x + c\right ) + 3 \, \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1\right ) + 4 \, \sin \left (3 \, d x + 3 \, c\right ) - 12 \, \sin \left (d x + c\right )}{6 \, a^{4} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.51307, size = 221, normalized size = 2.7 \begin{align*} \frac{{\left (3 \, e^{\left (3 i \, d x + 3 i \, c\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3 \, e^{\left (3 i \, d x + 3 i \, c\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 6 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 2 i\right )} e^{\left (-3 i \, d x - 3 i \, c\right )}}{3 \, a^{4} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20956, size = 99, normalized size = 1.21 \begin{align*} \frac{\frac{3 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{4}} - \frac{3 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{4}} + \frac{8 \,{\left (3 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1\right )}}{a^{4}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{3}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]